package wtws.manager.in;

import java.util.Queue;

import wtws.message.EndOfScanData;
import wtws.message.SystemStatusData;
import wtws.message.interf.TdwrProdMessage;

public class SystemStatusMsgGenerator implements Runnable {
	private Queue<TdwrProdMessage> q;

	public SystemStatusMsgGenerator(Queue<TdwrProdMessage> q) {
		this.q = q;
	}

	@Override
	public void run() {

		while (true) {
			SystemStatusData ssd = new SystemStatusData(SystemStatusData.MODE_MONITOR, SystemStatusData.STATUS_GO);
			q.offer(ssd);
			EndOfScanData eosd = new EndOfScanData();
			q.offer(eosd);
			try {
				Thread.sleep(20000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}
